const pool = require("../config/mysqlPool")

const service = {
    // 插入合作表数据
    postCooperate(obj, callback) {
        obj.ctime = Date.now()
        pool.query(`insert into ht_cooperate set ? `, obj, (err, results) => {
            err ? callback(false) : callback(results)
        })
    },
    deleteCooperate(cid, callback) {
        pool.query(`delete  from ht_cooperate where cid =? `, cid, (err, results) => {
            err ? callback(false) : callback(results)
        })
    },
}

module.exports = service